package com.thiswhyme.openfeign.gson.config;

import com.google.gson.ExclusionStrategy;
import com.thiswhyme.openfeign.gson.adapter.GsonBizAdapter;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * @description: gson配置参数
 * @author: thiswhyme
 * @date: 2020/8/17
 */
@ConfigurationProperties(prefix = "thiswhyme.openfeign.codec.gson")
public class GsonProperties {

    /**
     * 序列化Date时，日期字符串格式
     */
    private String datePattern = "yyyy-MM-dd HH:mm:ss";

    /**
     * Exclusion策略
     */
    private List<Class<ExclusionStrategy>> exclusionStrategies;

    /**
     * 自定义序列化器
     */
    private List<Class<GsonBizAdapter>> bizAdapters;

    public String getDatePattern() {
        return datePattern;
    }

    public void setDatePattern(String datePattern) {
        this.datePattern = datePattern;
    }

    public List<Class<ExclusionStrategy>> getExclusionStrategies() {
        return exclusionStrategies;
    }

    public void setExclusionStrategies(List<Class<ExclusionStrategy>> exclusionStrategies) {
        this.exclusionStrategies = exclusionStrategies;
    }

    public List<Class<GsonBizAdapter>> getBizAdapters() {
        return bizAdapters;
    }

    public void setBizAdapters(List<Class<GsonBizAdapter>> bizAdapters) {
        this.bizAdapters = bizAdapters;
    }
}